export default {
  namespaced: true,
  state: {
    polygon: {},
    markers: [],
    lines: [],
    clickCtrl: {},
  },
  getters: {
    polygon: state => state.polygon,
    markers: state => state.markers,
    lines: state => state.lines,
    clickCtrl: state => state.clickCtrl,
  },
  mutations: {
    ['SET_POLYGON_DATA'] (state, data) {
      state.polygon = {...data};
    },
    ['CLEAR_MARKERS'] (state, data) {
      state.markers = [];
    },
    ['SET_MARKERS'] (state, data) {
      state.markers = [...data];
    },
    ['CLEAR_LINES'] (state, data) {
      state.lines = [];
    },
    ['SET_LINES'] (state, data) {
      state.lines = [...data];
    },
    ['SET_CLICK_CTRL'] (state, data) {
      state.clickCtrl = {...data};
    },
    ['CLEAR_CLICK_CTRL'] (state) {
      state.clickCtrl = {};
    },
  },
  actions: {

  }
}
